package org.zecontech.extraplus.block;

import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.CropBlock;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;

/**
 * 十字型作物方块
 */
public class CrossCropBlock extends CropBlock {

    // 作物方块的形状
    private static final VoxelShape SHAPE =
            Block.column(16.0F, 0.0F, 13.0F);

    public CrossCropBlock() {
        super(BlockBehaviour.Properties.ofFullCopy(Blocks.CARROTS));
    }

    // 覆盖方块的形状
    @Override
    protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) {
        return SHAPE;
    }
}
